﻿using DemoPrism.Core;
using PdfMod.Views;
using Prism.Ioc;
using Prism.Modularity;
using Prism.Navigation.Regions;

namespace PdfMod
{
    public class PdfModModule : IModule
    {
        private readonly IRegionManager _regionManager;

        public PdfModModule(IRegionManager regionManager)
        {
            _regionManager = regionManager;
        }

        public void OnInitialized(IContainerProvider containerProvider)
        {
            _regionManager.RequestNavigate(RegionNames.ContentRegion, "PdfMain");
        }

        public void RegisterTypes(IContainerRegistry containerRegistry)
        {
            containerRegistry.RegisterForNavigation<PdfMain>();
        }
    }
}